import request from '@/utils/request'
import type { DisposalRecord, DisposalQuery, PaginationResponse } from '@/types'

// 获取投放记录列表
export const getDisposalRecords = (params: DisposalQuery): Promise<PaginationResponse<DisposalRecord>> => {
  return request.get('/disposal/records', { params })
}

// 获取投放记录详情
export const getDisposalDetail = (id: number): Promise<DisposalRecord> => {
  return request.get(`/disposal/records/${id}`)
}

// 获取价格配置
export const getPricing = (): Promise<any> => {
  return request.get('/disposal/pricing')
}

// 更新价格配置
export const updatePricing = (data: any): Promise<void> => {
  return request.put('/disposal/pricing', data)
}

// 获取价格历史
export const getPricingHistory = (): Promise<any> => {
  return request.get('/disposal/pricing/history')
}

// 获取投放统计
export const getDisposalStats = (): Promise<any> => {
  return request.get('/disposal/statistics')
}